﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Exam.Core.DBUtility;
using System.Reflection;

namespace Exam.Core.DALFactory {
    public abstract class DataAccess {

        private static readonly string path = ConfigurationManager.AppSettings["WebDAL"].ToLower().Trim();
        private static string className = path;

        

        private static DataAccess _defaultInstance = null;
        static DataAccess() {
            //DataAccess._defaultInstance = (Exam.Core.DBUtility.DbHelperOleDb)Assembly.Load(path).CreateInstance(className); ;
        }

        public static Exam.Core.IDAL.ICourse CreateCourse()
        {
            string className = path;
            return (Exam.Core.IDAL.ICourse)Assembly.Load(path).CreateInstance(className);
        }




        
    }
}
